package com.heima.apis.ariticle;

import com.heima.model.article.dtos.ArticleCommentDto;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.article.dtos.DelCommentDto;
import com.heima.model.comment.dtos.CommentConfigDto;
import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("leadnews-article")
public interface IArticleClient  {
    @PostMapping("/api/article/api/save")
    ResponseResult save(@RequestBody ArticleDto dto);


    @PostMapping("/api/article/api/findById")
    ResponseResult findById(@RequestParam("articleId") Long articleId);


    @PostMapping("/api/article/api/findByPage")
    PageResponseResult findByPage(@RequestBody ArticleCommentDto dto);

    @DeleteMapping("/api/article/api/delComment")
    ResponseResult delComment(@RequestBody DelCommentDto delCommentDto);

    @PutMapping("/api/article/api/changeArticle")
    ResponseResult changeArticleStatus(@RequestBody CommentConfigDto dto);
}
